import { AxiosPromise } from 'axios'
import request from '/@/utils/request'
const prefix = '/api/dms/inventory/'

 // 其他出入库筛选项
 export const getInventorySearch: () => AxiosPromise = () =>
    request(`${prefix}search`)

// 其他出库列表
export const getInventoryStockOut: (data: object) => AxiosPromise = (data) =>
 request(`${prefix}stockOut`, { data })

 // 其他出库详情
export const getInventoryStockOutInfo: (data: object) => AxiosPromise = (data) =>
    request(`${prefix}stockOutInfo`, { data })

// 其他入库列表
export const getInventoryStockIn: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}stockIn`, { data })

 // 其他入库详情
 export const getInventoryStockInInfo: (data: object) => AxiosPromise = (data) =>
 request(`${prefix}stockInInfo`, { data })

/* 库存 */
// 库存盘点列表
export const getInventoryGrilled: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}grilled`, { data })

// 库存盘点明细
export const getInventoryGrilledInfo: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}grilledInfo`, { data })

  // 库存查询
export const getInventoryStock: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}stock`, { data })

  // 库存明细查询
export const getInventoryStockBatch: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}stockBatch`, { data })

  // 库存查询---主仓明细账
export const getInventoryChangeList: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}changeList`, { data })

  // 库存明细查询---主仓明细账
export const getInventoryBatchChangeList: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}batchChangeList`, { data })


//通过产品id 获取产品的仓库 批次 有效期
export const getInventoryOrderSearch: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}orderSearch`, { data })

// 通过产品id  仓库 获取  结算组织与库存组织
export const getInventoryAvailable: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}available`, { data })

// 通过 pec_no 必传 产品编码，owner_no 仓库编码，expire_day效期天数 获取批次号
export const getInventorySearchBatch: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}searchBatch`, { data })

// 库存占用查询
export const getInventoryPossessList: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}possessList`, { data })

/* 寄售 */
// 获取寄售仓库
export const getConsginStockList: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}ConsginStockList`, { data })
// 寄售库存查询---主仓明细账
export const getConsignBatchChangeList: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}consignBatchChangeList`, { data })
// 寄售库存明细查询
export const getStockConsignBatch: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}stockConsignBatch`, { data })
// 寄售仓
export const getInventoryConsginStockList: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}ConsginStockList`, { data })
